package com.baidu.infinity.ui.fragment.home.shape.shapes

import android.graphics.Canvas
import android.os.Build
import androidx.annotation.RequiresApi
import com.baidu.infinity.ui.fragment.home.shape.BaseShape

class RectangleShape: BaseShape() {
    @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
    override fun draw(canvas: Canvas) {
        super.draw(canvas)
        canvas.drawRect(rectF,mPaint)
    }

    override fun containsPoint(x: Float, y: Float): Boolean {
        return rectF.contains(x,y)
    }
}